<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动</title>
    <style>
        .container{
            outline: 1px solid pink;
            background-color: rgb(221, 236, 248);
            /* height: 400px; */
        }
        .small{
            width: 120px;
            height: 120px;
            border: 1px solid black;
        }
        .middle{
            width: 200px;
            height: 200px;
        }
        .red{
            background-color: red;
        }
        .green{
            background-color: green;
        }
        .blue{
            background-color: blue;
        }
        .yellow{
            background-color: yellow;
        }
        .orange{
            background-color: orange;
        }
        .pink{
            background-color: pink;
        }
        .fl{
            float: left;
        }
        .fr{
            float: right;
        }
        .box{
            height: 100px;
            background-color: rgb(235, 136, 136);
            float: left;
        }
        .text{
            background-color: rgb(240, 201, 201);
            width: 50px;
            height: 50px;
        }
        .clear{
            clear: both;
            color: white;
        }
        /* .container::after{
            content: '';
            display: block;
            clear: both;
        }
        .container1::after{
            content: '';
            display: block;
            clear: both;
        } */
        .clearfix::after{
            content: '';
            display: block;
            clear: both;
            zoom: 1;
        }
    </style>
</head>
<body>
    <div class="container clearfix">
        <div class="middle pink fr"></div>
        <div class="small red fr "></div>
        <div class="small green fl"></div>
        
        <div class="small blue fr"></div>
        <div class="small yellow fl"></div>
        <div class="small orange fl"></div>
       
        
    </div>
    <div class="container clearfix">
        <div class="middle pink fr"></div>
        <div class="small red fr "></div>
        <div class="small green fl"></div>
        
        <div class="small blue fr"></div>
        <div class="small yellow fl"></div>
        <div class="small orange fl"></div>
        
        
    </div>
    <div class="container clearfix">
        <div class="small red fr "></div>
        <div class="small green fl"></div>
        
        <div class="small blue fr"></div>
        <div class="small yellow fl"></div>
        <div class="small orange fl"></div>
        
        
    </div>
   
    
</body>
</html>